package org.gui.featureSelection;

import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class NumbersExtractorPanel extends JPanel{

		private static final long serialVersionUID = 1L;
		
		JCheckBox isSelected;
		JLabel numberLabel;
		JTextField numberInput;
		
	public NumbersExtractorPanel(){

		setLayout(new GridLayout(1,2,0,10));
		isSelected = new JCheckBox("Numbers in text");
		numberLabel = new JLabel("Numbers= ");
		numberLabel.setHorizontalAlignment(JLabel.RIGHT);
		numberInput = new JTextField();
		add(isSelected);
		add(numberLabel);
		add(numberInput);		
		
	}
	
	public ArrayList<String> getFeature(){
		
		ArrayList<String> answer = new ArrayList<String>();
		if(isSelected.isSelected()==true){
			answer.add(numberInput.getText());
			return answer;
		}
		
		return null;
	}
	
}
